import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './xya/css/common.css'
import flexible from './utils/flexible.js'
import 'vant/lib/index.css';
import Vant from 'vant';
import FastClick from 'fastclick'
FastClick.attach(document.body)

Vue.use(Vant);
Vue.config.productionTip = false

// router.beforeEach((to, from, next) => {
//   const token = localStorage.getItem('user')
//   if (!token && to.path !== '/') {
//     next('/') // 跳转到登录页面
//   } else {
//     next() // 继续页面跳转
//   }
// })

new Vue({
  router,
  store,
  flexible,
  render: h => h(App)
}).$mount('#app')
